//
//  D_DataBase.h
//  音悦咖
//
//  Created by dllo on 15/5/1.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>
#import "D_MyMusic.h"
#import "L_RecommendPlayModel.h"
#import "C_RecentSkimModel.h"
@interface D_DataBase : NSObject

{
    sqlite3 *dbPoint;
}


+ (D_DataBase *)shareInstance;

- (void)openDB;

- (void)closeDB;

- (void)createTable;

// 插入歌曲
- (void)insertInforMyMusic:(D_MyMusic *)myMusic;

// 插入我的收藏
- (void)insertMyCollect:(D_MyMusic *)collect;

//插入新的浏览

- (void)insertInforRecentSkim:(C_RecentSkimModel *)myRecent;

//查询最近浏览信息

- (NSMutableArray *)selectInforRecent;
//删除浏览记录

- (void)deleteFromTitle:(NSString *)title;


//  删除 浏览表格
- (void)deleteRecentTable;
// 删除歌曲
- (void)deleteInforWithNum:(NSString *)song_name;

// 删除收藏歌曲
- (void)deleteCollection:(NSString *)song_name;

// 删除本地
- (void)deleteLocal:(NSString *)song_name;

// 查询信息
- (NSMutableArray *)selectInfor;

// 删除表
- (void)deleteTable;

// 插入本地歌曲
- (void)insertLocalMyMusic:(D_MyMusic *)local;

// 查询本地信息
- (NSMutableArray *)selectLocal;


// 查询收藏信息
- (NSMutableArray *)selectCollect;


/// 删除所有表
- (void) deleteAllTable;

@end
